--------------------------------------------------------------------------------
      name:  <unnamed>
       log:  E:\Seagate Sync\VOL\Personal folder\Documents\Research\Past project
> s\cbld\Posted\121020 Website\Data analysis\cbld-management05.log
  log type:  text
 opened on:  21 Oct 2012, 15:41:08

. 
. 
. * ************************************
. * Empirically observed consensus rates
. * ************************************
. 
. * Programme:    cbld-management05.do
. * Project:              Council coalition building
. * Author:               Frank Haege, Department of Politics and Administration
> , University of Limerick
. * Contact:              frank.haege@ul.ie
. 
. * Description
. *************
. * This do-file inputs data on consensual decision-making in the Council and 
. * saves them in different data set formats.
. * The data for the years 1994 up to and including 2002 are directly taken 
. * from Table 1a in Heisenberg (2005: 72); the data for the years 2003 to 2006 
. * are calculated from Table 3 in Hagemann & De Clerck-Sachsse (2007: 13).
. 
. 
. * Set up Stata
. version 11

. clear all

. macro drop _all

. set linesize 80

. set more off

. 
.         
. * Input observed consensus rate data and generate figure
. ********************************************************        
.         
. * Input consensus data
. input year consensus nostates

          year  consensus   nostates
  1.         1994 75 12
  2.         1995 78 15
  3.         1996 81 15
  4.         1997 78 15
  5.         1998 74 15
  6.         1999 85 15
  7.         2000 97 15
  8.         2001 83 15
  9.         2002 81 15
 10.         2003 78 15
 11.         2004 91 15
 12.         2005 89 25
 13.         2006 78 25
 14. end

.         
. * Generate rule-member state period variable
. generate rulemembersize = .
(13 missing values generated)

. replace rulemembersize = 1 if year == 1994
(1 real change made)

. replace rulemembersize = 2 if year > 1994 & year <= 2003
(9 real changes made)

. replace rulemembersize = 3 if year > 2003 & year <= 2006
(3 real changes made)

. replace rulemembersize = 4 if year > 2006       
(0 real changes made)

. 
. * Label variables       
. label var year "Year"

. label var consensus "Consensual Decisions (%)"  

. label var nostates "Number of Member States"

. label var rulemembersize "Rule-membership period"

.         
. * Save consensus data in long format
. sort rulemembersize

. compress
year was float now int
consensus was float now byte
nostates was float now byte
rulemembersize was float now byte

. save "Experiments\Other data\cbld-management05a.dta", replace   
file Experiments\Other data\cbld-management05a.dta saved

.                 
. * Reshape consensus data into wide format
. forvalues i = 1994(1)2006 {
  2.         generate consensus`i' = consensus if year == `i'
  3. }
(12 missing values generated)
(12 missing values generated)
(12 missing values generated)
(12 missing values generated)
(12 missing values generated)
(12 missing values generated)
(12 missing values generated)
(12 missing values generated)
(12 missing values generated)
(12 missing values generated)
(12 missing values generated)
(12 missing values generated)
(12 missing values generated)

. 
. * Collapse data by number of member states
. collapse (mean) mconsensus = consensus (min) consensus* , by(rulemembersize)  
>   

. drop consensus

. 
. * Label variables
. label var mconsensus "Observed consensus (mean)"

. forvalues i = 1994(1)2006 {
  2.         label var consensus`i' "Observed consensus (`i')"
  3. }

. 
. * Adjust regime variable slightly for plotting of predicted values in Figure 4
. preserve

.         replace rulemembersize = rulemembersize - 0.2
rulemembersize was byte now float
(3 real changes made)

.         drop mconsensus

.         save "Experiments\Other data\cbld-management05b.dta", replace   
file Experiments\Other data\cbld-management05b.dta saved

. restore

. preserve

.         replace rulemembersize = rulemembersize - 0.1
rulemembersize was byte now float
(3 real changes made)

.         drop consensus*

.         save "Experiments\Other data\cbld-management05c.dta", replace   
file Experiments\Other data\cbld-management05c.dta saved

. restore

. 
. * Save consensus data in wide format
. sort rulemembersize

. save "Experiments\Other data\cbld-management05d.dta", replace
file Experiments\Other data\cbld-management05d.dta saved

. 
. 
. * Exit do-file
. log close
      name:  <unnamed>
       log:  E:\Seagate Sync\VOL\Personal folder\Documents\Research\Past project
> s\cbld\Posted\121020 Website\Data analysis\cbld-management05.log
  log type:  text
 closed on:  21 Oct 2012, 15:41:08
--------------------------------------------------------------------------------
